
Knokx
(usa Ubuntu)
Enviado em 11/04/2012 - 15:53h
Boa tarde galera..
Estou trabalhando em um projeto e em determinada função ele utiliza ponteiro e struct, mas estou tendo problemas pra mostrar o valor.. Queria mostrar o valor que está armazenado em position... ele recebe *sg por parâmetro.
estou usando o gcc no ubuntu.
linha:
fprintf("%d",sg->node[p].position);
erro:
./src/OPF.c: In function ‘opf_MSTPrototypes’:
./src/OPF.c:588:4: warning: passing argument 1 of ‘fprintf’ from incompatible pointer type
/usr/include/bits/stdio2.h:96:1: note: expected ‘struct FILE * __restrict__’ but argument is of type ‘char *’
./src/OPF.c:588:4: warning: passing argument 2 of ‘fprintf’ makes pointer from integer without a cast
/usr/include/bits/stdio2.h:96:1: note: expected ‘const char * __restrict__’ but argument is of type ‘int’
./src/OPF.c:588:4: warning: format not a string literal and no format arguments
Se alguém poder ajudar, ficaria grato =)
(se postei algo errado/lugar errado/sei la, por favor falar.)